package com.cc.alltype.wechat.mpbutton;

import java.io.Serializable;

/**
 * @author chanchaw
 * @create 2024-12-25 9:59
 */
public class ViewButtonMini extends AbstractButton implements Serializable {
    private static final long serialVersionUID = 1L;
    private String type;
    private String url;
    private String appid;
    private String pagepath;

    public ViewButtonMini() {
    }

    public ViewButtonMini(String name) {
        super(name);
    }
    public ViewButtonMini(String name, String appid,String pagepath) {
        this.setType("miniprogram");
//        this.setUrl("http://mp.weixin.qq.com");
        this.setName(name);
        this.setAppid(appid);
        this.setPagepath(pagepath);
    }

    public ViewButtonMini(String name,String url, String appid,String pagepath) {
        this.setType("miniprogram");
        this.setName(name);
        this.setUrl(url);
        this.setAppid(appid);
        this.setPagepath(pagepath);
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    public String getAppid() {
        return appid;
    }

    public void setAppid(String appid) {
        this.appid = appid;
    }

    public String getPagepath() {
        return pagepath;
    }

    public void setPagepath(String pagepath) {
        this.pagepath = pagepath;
    }

    @Override
    public String toString() {
        return "ViewButtonMini{" +
                "type='" + type + '\'' +
                ", url='" + url + '\'' +
                ", appid='" + appid + '\'' +
                ", pagepath='" + pagepath + '\'' +
                '}';
    }


}
